<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="header::header" />
<body>

<div id="dgtoolbar" class="datagrid-toolbar">
		<span>机构名称：</span><input id="q_cbank" class="easyui-textbox" style="width: 200px" data-options=""></input>
		<span>企业名称：</span><input id="q_ccompany" class="easyui-textbox" style="width: 200px" data-options=""></input>
		<a id="querybtn" href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" title="查询" onclick="subQueryHandler()">查询</a>
		<a id="reset" href="#" class="easyui-linkbutton" iconCls="icon-reload" plain="true" onclick="reset()">重置</a>
		<a id="deletebtn" href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" title="批量删除">删除</a>
		<a id="reloadbtn" href="#" class="easyui-linkbutton" iconCls="icon-reload" plain="true">刷新</a>
		
	</div>
	<!-- 表格 -->
	<table id="dg" class="easyui-datagrid" data-options="url:'pageQuery',idField:'iid',rownumbers:true,singleSelect:false,method:'post',toolbar:'#dgtoolbar',pagination:true,pageSize:20,pageList:[20,30,50],fit:true,onLoadSuccess:onDGLoadSuccess">
		<thead>
			<tr>
				<th data-options="field:'iid'" checkbox="true"></th>
				<th data-options="field:'cbank'" 	width="300" 	align="center">金融机构名称</th>
				<th data-options="field:'cconsultant'" 		width="80" 		align="center">顾问名</th>
				<th data-options="field:'isbankconnect'"  formatter="Data.issueFormat"		width="80" 		align="center">银行是否对接</th>
				<th data-options="field:'ccompany'" 	width="300" 	align="center">企业名称</th>
				<th data-options="field:'ccompanyuser'" 		width="80" 		align="center">企业发起人</th>
				<th data-options="field:'iscompanyconnect'" formatter="Data.issueFormat" 		width="80" 		align="center">企业是否对接</th>
				<th data-options="field:'dconnecttime'" 		width="150" 	align="center">对接成功时间</th>
				
			</tr>
		</thead>
	</table>
	<!-- 弹出框 -->
	<div id="dlg" class="easyui-dialog" title="操作" style="padding:5px" data-options="buttons: '#dlg-buttons',closed:'true',modal:true">
		<form id="dataform" method="post" enctype="multipart/form-data">
			<table>
				<tr></tr>
				<tr>
					<td>机构名称:</td>
					<td>
						<input name="iid" id="iid" type="hidden"></input>
						<input name="cpicname" id="cpicname" type="hidden">
					<input name="cpicpath" id="cpicpath" type="hidden">
					<input name="cpicsize" id="cpicsize" type="hidden">
						<input name="cname" class="easyui-textbox" style="width: 200px" data-options="required:true"></input>
					</td>
				</tr>
				<tr>
					<td>机构地址:</td>
					<td>
						<input name="caddress" id="caddress" class="easyui-textbox" style="width: 200px" data-options="required:true"></input>
					</td>
				</tr>
				<tr>
					<td>联系人:</td>
					<td>
						<input name="clinkman" id="clinkman" class="easyui-textbox" style="width: 200px" data-options="required:true"></input>
					</td>
				</tr>
				<tr>
					<td>联系电话:</td>
					<td>
						<input name="cphone" id="cphone" class="easyui-textbox" style="width: 200px" data-options="required:true"></input>
					</td>
				</tr>
				<tr>
					<td>机构简介:</td>
					<td>
						<input name="cintroduction" id="cintroduction" class="easyui-textbox" style="width: 200px" data-options="required:true"></input>
					</td>
				</tr>
				<tr>
					<td>上传文件:</td>
					<td><input type="file" name="upfile" id="upfile"></input>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<!-- 弹出框工具栏 -->
	<div id="dlg-buttons">
			<a id="dlg-savebtn" 	href="javascript:void(0)" style="width:50" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
			<a id="dlg-closebtn" 	href="javascript:void(0)" style="width:50" class="easyui-linkbutton" iconCls="icon-no">关闭</a>
	</div>
	

</body>
<script type="text/javascript" th:src="@{/common/GridView.js}"></script>
<script type="text/javascript">

function subQueryHandler() {
	
		$("#dg").datagrid("load", {
			cbank : $("#q_cbank").textbox("getValue"),
			ccompany : $("#q_ccompany").textbox("getValue")
		});
	}
function reset(){
    $("#q_cbank").textbox("setValue", "");
	$("#q_ccompany").textbox("setValue","")
}
</script>
</html>